refactor(agent-manager): remove redundant header buttons#4568
Conversation
Remove the 'New Agent' (Plus) and 'Refresh messages' (RefreshCw) buttons from the session detail header. These actions are already available in the sidebar, making the header buttons redundant. Changes: - Remove am-header-actions div with both buttons - Remove unused imports: Plus, RefreshCw, selectedSessionIdAtom, useSetAtom - Remove handleRefresh and handleNew functions
🦋 Changeset detectedLatest commit: 1a4a066 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
✅ No Issues Found
2 files reviewed | Confidence: 95% | Recommendation: Merge
Review Details
Files:
.changeset/remove-agent-manager-header-buttons.md(new)webview-ui/src/kilocode/agent-manager/components/SessionDetail.tsx(modified)
Checked: Security, bugs, unused code, import cleanup
Analysis:
- All removed imports (
useSetAtom,selectedSessionIdAtom,RefreshCw,Plus) are correctly cleaned up - Removed functions (
handleRefresh,handleNew) were only used by the deleted buttons - No orphaned code or unused variables remain
- Clean refactoring with proper changeset documentation
There was a problem hiding this comment.
✅ No Issues Found
2 files reviewed | Confidence: 95% | Recommendation: Merge
Review Details
Files:
.changeset/remove-agent-manager-header-buttons.md(changeset)webview-ui/src/kilocode/agent-manager/components/SessionDetail.tsx(source)
Analysis:
This PR cleanly removes redundant "New Agent" and "Refresh messages" buttons from the SessionDetail component header. The changes are well-structured:
-
Removed imports are correctly cleaned up:
useSetAtomremoved from jotai (no longer needed)selectedSessionIdAtomremoved from sessions atomsRefreshCwandPlusicons removed from lucide-react
-
Removed handlers are safe to delete:
handleRefresh()- sentagentManager.refreshSessionMessagesmessagehandleNew()- calledsetSelectedSessionId(null)
-
Functionality preserved elsewhere:
- The "New Agent" functionality is available in
SessionSidebar.tsxvia thehandleNewSession()function which also callssetSelectedId(null) - The refresh functionality for remote sessions is available in
SessionSidebar.tsxviahandleRefresh()which sendsagentManager.refreshRemoteSessions
- The "New Agent" functionality is available in
-
No breaking changes:
- The removed buttons were UI-only; no API contracts or external interfaces affected
- The
selectedSessionIdAtomis still exported and used bySessionSidebar.tsx
Checked: Security, bugs, performance, error handling, dead code
Removes redundant header buttons form header